// 对axios的封装
import axios from 'axios'

const ERR_OK = 200
const baseURL = '/'
axios.defaults.baseURL = baseURL

export function get (url) {
  return axios.get(url).then((res) => {
    console.log(res)
    const severData = res
    if (severData.status === ERR_OK) {
      return severData.data
    }
  }).catch((e) => {
    console.log(e)
  })
}
